-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat(cloudwatch-appsignals-mcp-server): Add get_enablement_guide MCP tool #1585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cloudwatch-appsignals-mcp-server): Add get_enablement_guide MCP tool #1585
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new get_enablement_guide MCP tool to help AI assistants automatically retrieve and follow Application Signals enablement instructions. The tool accepts platform, language, and directory paths as inputs, validates them, and returns an AI-friendly enablement guide with context-specific instructions.
Key Changes:
- Introduces the
get_enablement_guidefunction with parameter validation and path resolution - Creates directory structure for storing platform/language-specific enablement guides
- Implements comprehensive test coverage for validation, error handling, and successful guide retrieval
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
awslabs/cloudwatch_appsignals_mcp_server/enablement_tools.py |
Core implementation of the get_enablement_guide function with validation logic and template loading |
tests/test_enablement_tools.py |
Unit tests covering invalid inputs, missing directories, and successful guide fetching |
enablement_guides/templates/ec2/ec2-python-enablement.md |
Placeholder markdown file for EC2+Python enablement guide |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...loudwatch-appsignals-mcp-server/awslabs/cloudwatch_appsignals_mcp_server/enablement_tools.py
Outdated
Show resolved
Hide resolved
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1585 +/- ##
==========================================
+ Coverage 90.08% 90.20% +0.11%
==========================================
Files 751 597 -154
Lines 54377 46128 -8249
Branches 8672 7402 -1270
==========================================
- Hits 48988 41611 -7377
+ Misses 3454 2897 -557
+ Partials 1935 1620 -315 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
bd78c95 to
4e63eb4
Compare
thpierce
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did not review tests yet.
...loudwatch-appsignals-mcp-server/awslabs/cloudwatch_appsignals_mcp_server/enablement_tools.py
Show resolved
Hide resolved
...loudwatch-appsignals-mcp-server/awslabs/cloudwatch_appsignals_mcp_server/enablement_tools.py
Outdated
Show resolved
Hide resolved
...loudwatch-appsignals-mcp-server/awslabs/cloudwatch_appsignals_mcp_server/enablement_tools.py
Show resolved
Hide resolved
...loudwatch-appsignals-mcp-server/awslabs/cloudwatch_appsignals_mcp_server/enablement_tools.py
Outdated
Show resolved
Hide resolved
...loudwatch-appsignals-mcp-server/awslabs/cloudwatch_appsignals_mcp_server/enablement_tools.py
Outdated
Show resolved
Hide resolved
...loudwatch-appsignals-mcp-server/awslabs/cloudwatch_appsignals_mcp_server/enablement_tools.py
Outdated
Show resolved
Hide resolved
...loudwatch-appsignals-mcp-server/awslabs/cloudwatch_appsignals_mcp_server/enablement_tools.py
Outdated
Show resolved
Hide resolved
...loudwatch-appsignals-mcp-server/awslabs/cloudwatch_appsignals_mcp_server/enablement_tools.py
Outdated
Show resolved
Hide resolved
...loudwatch-appsignals-mcp-server/awslabs/cloudwatch_appsignals_mcp_server/enablement_tools.py
Outdated
Show resolved
Hide resolved
...loudwatch-appsignals-mcp-server/awslabs/cloudwatch_appsignals_mcp_server/enablement_tools.py
Outdated
Show resolved
Hide resolved
...loudwatch-appsignals-mcp-server/awslabs/cloudwatch_appsignals_mcp_server/enablement_tools.py
Outdated
Show resolved
Hide resolved
7d34b32 to
8f57ebd
Compare
wangzlei
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we put all enablement md files in src/cloudwatch-appsignals-mcp-server/awslabs/cloudwatch_appsignals_mcp_server/enablement_guides/templates/ ?
Will do this in a quick follow-up PR. |
|
Removed |
…tool (awslabs#1585) * add get_enablement_guide tool without registering it * apply ruff check . --fix * fix pre-commit checks * additional unit test coverage * require absolute paths for new get_enablement_guide tool * update docstring to specify md format * update with fallback for unsupported language and/or platform * update tool description to instruct agent to create a work/todo list * update tool description with platform and language detection hints for ai agent * add fallback instructions for agent in case it is not able to read enablement guides * remove exists() checks * loosen edit restrictions to also include dependency files * consolidate enablement change guidelines into tool description * refactor to make language and platform tool parameters enums * rename enablement tool to get_application_signals_enablement_guide * standardize error_msg construction for logging * remove redundant debug logs for iac_path and app_path * update agent to surface platform/language not supported message to user * move template file debug statement * run pre-commit checks * add use this tool when guidance to enablement tool description * apply suggested changes * replace temp_directories fixture with module-level constant * rename platform to service_platform for consistency * shorten enablement tool name back to get_enablement_guide * revert enums back to strings to surface friendly error message * add additional tets for code coverage * add guidance for AI agents to resolve paths before calling tool in description * add explicit checklist workflow instructions in enablement tool description * remove generic verify step from tool instructions
Fixes
Summary
Adding new
get_enablement_guideMCP tool. The goal of this tool is to fetch the appropriate enablement guide for AI Assistants to correctly follow Application Signals enablement steps. Currently, these AI-friendly enablement guides will be hosted in this MCP repo. Long-term, we aim to replace our public documentation entirely with these new enablement guides.Changes
get_enablement_guidetool inenablement_tools.pyenablement_guides/templates/directory structure for markdown guidesUser experience
Before:
Users had to manually feed relevant pieces of the enablement docs in small chunks to AI Assistants because the public documentation is not AI-friendly. Feeding the entire documentation to the AI assistant led to poor and inconsistent enablement results.
After:
With a single query like:
The AI assistant will now automatically retrieve the relevant enablement guide based on the context and follow the enablement instructions. The end result is customers will have AI-generated changes to their IaC code that they can deploy and start seeing Application Signals telemetry.
Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change? (N)
RFC issue number:
Checklist:
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.